var app = getApp();
// const rq = require('../../utils/function.js');
Page({
    data: {
        index: 0,
        statusBarHeight: app.globalData.navHeight,
        _Student_Tourist: false,
        teacher: true,
        model: '',
        bar_Height: wx.getSystemInfoSync().statusBarHeight * 2, // 获取手机状态栏高度
        indicatorDots: true,
        vertical: false,
        interval: 2000,
        duration: 1000,
        previousMargin: 0,
        nextMargin: 0,
        picList: [{
                type: 0,
                url: '../../static/image/login/img.png'
            },
            {
                type: 0,
                url: '../../static/image/login/img.png'
            }, {
                type: 1,
                url: 'http://wxsnsdy.tc.qq.com/105/20210/snsdyvideodownload?filekey=30280201010421301f0201690402534804102ca905ce620b1241b726bc41dcff44e00204012882540400&bizid=1023&hy=SH&fileparam=302c020101042530230204136ffd93020457e3c4ff02024ef202031e8d7f02030f42400204045a320a0201000400'
            }
        ],
        core: [{
            name: '商品预定',
            image: '../../static/icon/spyd.png',
            disabled: true,
            url: 'CommodityReservation/CommodityReservation'
        }, {
            name: '学生报到',
            image: '../../static/icon/xsbd.png',
            disabled: true,
            url: ''
        }, {
            name: '报到流程',
            image: '../../static/icon/bblc.png',
            disabled: true,
            url: '../PersonalCenter/RegistrationProcess/RegistrationProcess'
        }, {
            name: '学校简介',
            image: '../../static/icon/xxjj.png',
            disabled: true,
            url: ''
        }, {
            name: '校园风光',
            image: '../../static/icon/xyfg.png',
            disabled: true,
            url: 'CampusScenery/CampusScenery'
        }, {
            name: '入学须知',
            image: '../../static/icon/rxxz.png',
            disabled: true,
            url: 'StartingSchool/StartingSchool'
        }, {
            name: '帮困助学',
            image: '../../static/icon/bkzx.png',
            disabled: true,
            url: 'HelpStudents/HelpStudents'
        }, {
            name: '迎新资讯',
            image: '../../static/icon/yxzx.png',
            disabled: true,
            url: 'NewsAndInformation/NewsAndInformation'
        }],
        teacher_icon: [{
            name: '迎新办理',
            image: '../../static/icon/yxbl.png',
            url: 'ReportStatus/ReportStatus'
        }, {
            name: '专业报到',
            image: '../../static/icon/zybd.png',
            url: ''
        }, {
            name: '班级报到',
            image: '../../static/icon/bjbd.png',
            url: ''
        }, {
            name: '办理环节',
            image: '../../static/icon/blhj.png',
            url: ''
        }],
        body: {
            'yxzx': {
                show: false,
                data: {}
            },
            'jtlx': {
                show: false,
                data: {}
            },
            'tip': {
                show: false,
                data: {}
            },
            'xysh': {
                show: false,
                data: {}
            },
            'bkzx': {
                show: false,
                data: {}
            },
            'qxbdl': {
                show: false,
                data: {}
            }
        },
        studentAssistance: []
    },
    //预览图片
    // previewImg: function(e) {
    //   debugger;
    //   var currentUrl = e.currentTarget.dataset.currenturl
    //   var previewUrls = e.currentTarget.dataset.previewurl
    //   wx.previewImage({
    //     current: currentUrl, //必须是http图片，本地图片无效
    //     urls: previewUrls, //必须是http图片，本地图片无效
    //   })
    // },
    onLoad() {
        var that = this;
        //加载数据
        that.getPageData();
        //顶部适应iPhoneX高度
        if (wx.getSystemInfoSync().model != "iPhone X") {
            that.setData({
                bar_Height: 65
            })
        }
    },
    onShow() {
        wx.hideTabBar();
    },
    getPageData() {
        var that = this;
        var yx = [];
        var lx = [];
        var xy = [];
        var bk = [];
        var bd = [];
        //迎新
        yx.push({
            image: '../../static/image/login/img.png',
            title: '这是title',
            content: '这是主要内容这是主要内容',
            date: '2020-11-11 10:30',
            icon_display: '../../static/icon/Already_read_dark.png',
            icon_d_num: 500,
            icon_Fabulous: '../../static/icon/Fabulous_dark.png',
            icon_F_num: 100
        }, {
            image: '../../static/image/login/img.png',
            title: '这是title',
            content: '这是主要内容这是主要内容',
            date: '2020-11-11 10:30',
            icon_display: '../../static/icon/Already_read_dark.png',
            icon_d_num: 500,
            icon_Fabulous: '../../static/icon/Fabulous_dark.png',
            icon_F_num: 222
        }, {
            image: '../../static/image/login/img.png',
            title: '这是title',
            content: '这是主要内容这是主要内容',
            date: '2020-11-11 10:30',
            icon_display: '../../static/icon/Already_read_dark.png',
            icon_d_num: 500,
            icon_Fabulous: '../../static/icon/Fabulous_dark.png',
            icon_F_num: 333
        }, {
            image: '../../static/image/login/img.png',
            title: '这是title',
            content: '这是主要内容这是主要内容',
            date: '2020-11-11 10:30',
            icon_display: '../../static/icon/Already_read_dark.png',
            icon_d_num: 500,
            icon_Fabulous: '../../static/icon/Fabulous_dark.png',
            icon_F_num: 444
        });
        //路线
        lx.push({
            start: '南京火车站',
            icon: '../../static/image/index/place.png',
            image: '../../static/icon/spyd.png',
            end: '北京西站'
        }, {
            start: '南京火车站',
            icon: '../../static/image/index/place.png',
            image: '../../static/icon/spyd.png',
            end: '苏州火车站'
        }, {
            start: '南京禄口国际机场',
            icon: '../../static/image/index/place.png',
            image: '../../static/icon/spyd.png',
            end: '广州白云机场'
        });
        //校园生活
        xy.push({
            title: '餐饮服务',
            image: '/static/image/index/cyfw.png',
            wave: '../../static/image/index/p_wave.png'
        }, {
            title: '交通出行',
            image: '/static/image/index/jtcx.png',
            wave: '../../static/image/index/g_wave.png'
        }, {
            title: '医疗健康',
            image: '/static/image/index/yljk.png',
            wave: '../../static/image/index/b_wave.png'
        }, {
            title: '教室场馆',
            image: '/static/image/index/jscg.png',
            wave: '../../static/image/index/v_wave.png'
        }, {
            title: '学生公寓',
            image: '/static/image/index/xsgy.png',
            wave: '../../static/image/index/p_wave.png'
        }, {
            title: '网络服务',
            image: '/static/image/index/wlfw.png',
            wave: '../../static/image/index/b_wave.png'
        }, {
            title: '生活服务',
            image: '/static/image/index/shfw.png',
            wave: '../../static/image/index/v_wave.png'
        }, {
            title: '校园卡',
            image: '/static/image/index/xyk.png',
            wave: '../../static/image/index/g_wave.png'
        });
        bk.push({
            sa_class: 'background:#FF4E00',
            title: '奖助学金',
            image: '/static/image/index/qgzx.png',
            wave: '../../static/image/index/t_wave.png'
        }, {
            sa_class: 'background:#009FFD',
            title: '勤工俭学',
            image: '/static/image/index/qgzx.png',
            wave: '../../static/image/index/t_wave.png'
        }, {
            sa_class: 'background:#00AF43',
            title: '绿色通道',
            image: '/static/image/index/lstd.png',
            wave: '../../static/image/index/t_wave.png'
        }, {
            sa_class: 'background:#8248AE',
            title: '助学贷款',
            image: '/static/image/index/zxdk.png',
            wave: '../../static/image/index/t_wave.png'
        });
        bd.push({
            type: '全校',
            image: '../../static/icon/school.png',
            states: [{
                    'finish': '已报到',
                    'finish_number': '2222'
                }, {
                    'Underway': '报到中',
                    'Underway_number': '122'
                },
                {
                    'notFinished': '未报到',
                    'notFinished_number': '22'
                },
            ],
            person: '100'
        }, {
            type: '全校',
            image: '../../static/icon/school.png',
            states: [{
                    'finish': '已报到',
                    'finish_number': '2222'
                }, {
                    'Underway': '报到中',
                    'Underway_number': '1229'
                },
                {
                    'notFinished': '未报到',
                    'notFinished_number': '22'
                },
            ],
            person: '100'
        }, {
            type: '全校',
            image: '../../static/icon/school.png',
            states: [{
                    'finish': '已报到',
                    'finish_number': '2222'
                }, {
                    'Underway': '报到中',
                    'Underway_number': '1222'
                },
                {
                    'notFinished': '未报到',
                    'notFinished_number': '222'
                },
            ],
            person: '100'
        });
        that.setData({
            'body.yxzx.data': yx,
            'body.yxzx.show': true,
            'body.xysh.data': xy,
            'body.xysh.show': true,
            'body.tip.data': "迎新当天, 学校在各个生活区设立站点，环形发车，新生及家长学校在各个生活区设立站点，环形发车，新生及家长可乘车到相应生活区。可乘车到相应生活区。‘校内小公交’ 为新生提供免费乘车服务。",
            'body.tip.show': true,
            'body.jtlx.data': lx,
            'body.jtlx.show': true,
            'body.bkzx.show': true,
            'body.bkzx.data': bk,
            'body.qxbdl.data': bd,
            'body.qxbdl.show': true
        });
    },
    add(e) {
        // debugger;
        let aa = this.data.body.yxzx.data[e.currentTarget.dataset.index].icon_F_num = e.currentTarget.dataset.text + 1
        this.setData({
            body: this.data.body
        })
    }
})